<?php
/**
 * 商品属性的值表
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2018/6/7
 * @copyright PanxSoft Inc.
 */
namespace App\Models\Panx;

use Illuminate\Database\Eloquent\Model;

/**
 * Class AttributeValue
 *
 * @property string value
 * @property int attribute_id
 * @property int id
 *
 * @package App\Models\Panx
 */
class AttributeValue extends Model
{
    protected $table = 'attribute_values';

    protected $guarded = [];

    protected $casts = [
        'attribute_id' => 'int',
    ];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function attribute()
    {
        return $this->belongsTo(Attribute::class, 'attribute_id', 'id');
    }
}
